# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=py3-pyzbar
pkgver=0.1.8
pkgrel=3
pkgdesc="Read one-dimensional barcodes and QR codes from Python 3"
url="https://github.com/NaturalHistoryMuseum/pyzbar/"
arch="all"
license="MIT"
depends="python3 zbar"
makedepends="python3-dev py3-setuptools"
checkdepends="py3-coveralls py3-nose py3-numpy py3-pillow"
source="py3-pyzbar-$pkgver.tar.gz::https://github.com/NaturalHistoryMuseum/pyzbar/archive/v$pkgver.tar.gz"
builddir="$srcdir/pyzbar-$pkgver"

case "$CARCH" in
	s390x) options="!check" ;;
esac

build() {
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="e186c7a2f29ec107f66b87a2901e128291747ef7a2159675f3170aef2a3a4b1f4cb4319da830d577c986e20abb3f2935e005361cc98857b0e1b880fb4cf40233  py3-pyzbar-0.1.8.tar.gz"
